package org.example.order.vo;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.example.core.valid.annontation.ListValue;

import java.util.List;

/**
 * @author 小杰_cc
 * @version 1.0
 */
@Data
public class OrderRestVo {

    // 选择的地址id
    @NotNull(message = "收货地址不能为空")
    private Long addressId;
    // 订单备注
    private String note;
    // 令牌
    @NotBlank(message = "订单令牌不能为空")
    private String token;
    // 支付方式
    @NotNull(message = "支付方式不能为空")
    @ListValue(value = {1,2,3,4},message = "支付方式选择错误")
    private Integer payType;
    // 来源
    @NotNull
    @ListValue(value = {0,1,2}, message = "订单来源错误")
    private Integer sourceType;
    private Long skuId;
    private Integer count;
    @NotNull
    @ListValue(value = {1,2},message = "参数错误")
    private Integer type;
}
